//listflex
$('.listFlex').flexigrid
(
	{
		autoload: true,
		height: $('#main').height(),
		title: 'Holiday List',
		url: root + module + '/listview',
		blockOpacity: 0,
		dataType: 'json',
		colModel : [
			{display: '', name : 'a.group_id', width : 40, align:'center', process: viewItem}
			,{display: 'Holiday Name', name : 'holiday_name', width : 120, align : 'left', sortable:true}
			,{display: 'Holiday Date', name : 'holiday_date', width : 100, align : 'left', sortable:true}
			,{display: 'Holiday Type', name : 'holiday_type_name', width : 120, align : 'left', sortable:true}
			,{display: 'Value', name : 'value', width : 60, align : 'left', sortable:true}
			// ,{display: 'Username', name : 'a.username', width : 100, align : 'left', sortable:true}
			// ,{display: 'Email', name : 'a.email', width : 150, align : 'left', sortable:true}
			// ,{display: 'Role', name : 'b.role_name', width : 80, align : 'left', sortable:true}
			],
		buttons : [
			{name: 'Add', bclass: 'add', onpress : addItem},
			//{separator: true},
			{name: 'Delete', bclass: 'delete', onpress : deleteItem},
			//{separator: true}
		],
		newp: 1,
		sortname: "holiday_date",
		sortorder: "asc",
		rp: 40,
		usepager: true,
		useRp: true,
		resizable: true,
		showTableToggleBtn: true,
		singleSelect: false
	}
);
